<?php
  //Genesis Software Manual - Page 19

  $pdf->AddPage();
  //$pdf->Image('./Genesis/Gen-soft/Gsm-12.png',0,0,210 ,297);
  //add_raster(1);  
  
  $pdf->SetDrawColor(0,0,0);
  $pdf->SetTextColor(0,0,0);
  $pdf->SetFont('arial','B',10);
  $pdf->SetLineWidth(0.4);

  set_text_space(3.8);
 
  $margin = array
  (
    'tab_1' => 36,
    'tab_2' => 46,
    'tab_3' => 60
  );
   


  new_line(30); 
  $pdf->Text($margin['tab_3'],current_line(),'WRITE2: ADDRESS SET');
   
  new_line(42); 
  gentab_BitField_16($margin['tab_2'],current_line() - 3,15.4,7,
    '1st               ',
    array('CD1','CD0','A13','A12','A11','A10','A9','A8'),
    '$ C 0 0 0 0 4',
    array('A7','A6','A5','A4','A3','A2','A1','A0')
  );
   
  new_line(67); 
  gentab_BitField_16($margin['tab_2'],current_line() - 3,15.4,7,
    '2nd               ',
    array('0','0','0','0','0','0','0','0'),
    '$ C 0 0 0 0 4',
    array('CD5','CD4','CD3','CD2','0','0','A15','A14')
  );
   
  $pdf->SetFont('arial','',10);
   
  new_line(current_line() + 6);
    $pdf->Text($margin['tab_2'] + 2,current_line(),'CD5 ~ CD0:');
    $pdf->Text($margin['tab_2'] + 28,current_line(),'ID CODE');
  new_line();
    $pdf->Text($margin['tab_2'] + 2,current_line(),'A15 ~ A0:');
    $pdf->Text($margin['tab_2'] + 28,current_line(),'DESTINATION RAM ADDRESS');
   
     
  //Draw the table
  new_line(112);
    gentab_Start(0,$margin['tab_1'],104);
    gentab_Cell_Add(0,0,32);
    gentab_Cell_Add(0,1,13);
    gentab_Cell_Add(0,2,13);
    gentab_Cell_Add(0,3,13);
    gentab_Cell_Add(0,4,13);
    gentab_Cell_Add(0,5,13);
    gentab_Cell_Add(0,6,13);
    gentab_Cell_AutoWidth(0);
    
  new_line();
    gentab_Cell_Text(0,0,'ACCESS MODE','L');
    gentab_Cell_CenterText(0,1,'CD5');
    gentab_Cell_CenterText(0,2,'CD4');
    gentab_Cell_CenterText(0,3,'CD3');
    gentab_Cell_CenterText(0,4,'CD2');
    gentab_Cell_CenterText(0,5,'CD1');
    gentab_Cell_CenterText(0,6,'CD0');

  new_line();
    gentab_Line(0);
  new_line();
    gentab_Cell_Text(0,0,'VRAM WRITE','L');
    gentab_Cell_CenterText(0,1,'0');
    gentab_Cell_CenterText(0,2,'0');
    gentab_Cell_CenterText(0,3,'0');
    gentab_Cell_CenterText(0,4,'0');
    gentab_Cell_CenterText(0,5,'0');
    gentab_Cell_CenterText(0,6,'1');

  new_line();
    gentab_Line(0);
  new_line();
    gentab_Cell_Text(0,0,'CRAM WRITE','L');
    gentab_Cell_CenterText(0,1,'0');
    gentab_Cell_CenterText(0,2,'0');
    gentab_Cell_CenterText(0,3,'0');
    gentab_Cell_CenterText(0,4,'0');
    gentab_Cell_CenterText(0,5,'1');
    gentab_Cell_CenterText(0,6,'1');

  new_line();
    gentab_Line(0);
  new_line();
    gentab_Cell_Text(0,0,'VSRAM WRITE','L');
    gentab_Cell_CenterText(0,1,'0');
    gentab_Cell_CenterText(0,2,'0');
    gentab_Cell_CenterText(0,3,'0');
    gentab_Cell_CenterText(0,4,'1');
    gentab_Cell_CenterText(0,5,'0');
    gentab_Cell_CenterText(0,6,'1');

  new_line();
    gentab_Line(0);
  new_line();
    gentab_Cell_Text(0,0,'VRAM READ','L');
    gentab_Cell_CenterText(0,1,'0');
    gentab_Cell_CenterText(0,2,'0');
    gentab_Cell_CenterText(0,3,'0');
    gentab_Cell_CenterText(0,4,'0');
    gentab_Cell_CenterText(0,5,'0');
    gentab_Cell_CenterText(0,6,'0');

  new_line();
    gentab_Line(0);
  new_line();
    gentab_Cell_Text(0,0,'CRAM READ','L');
    gentab_Cell_CenterText(0,1,'0');
    gentab_Cell_CenterText(0,2,'0');
    gentab_Cell_CenterText(0,3,'1');
    gentab_Cell_CenterText(0,4,'0');
    gentab_Cell_CenterText(0,5,'0');
    gentab_Cell_CenterText(0,6,'0');

  new_line();
    gentab_Line(0);
  new_line();
    gentab_Cell_Text(0,0,'VSRAM READ','L');
    gentab_Cell_CenterText(0,1,'0');
    gentab_Cell_CenterText(0,2,'0');
    gentab_Cell_CenterText(0,3,'0');
    gentab_Cell_CenterText(0,4,'1');
    gentab_Cell_CenterText(0,5,'0');
    gentab_Cell_CenterText(0,6,'0');

  new_line();
    gentab_End(0);  
  new_line();
  //new_line();
    $pdf->Text($margin['tab_1'],current_line()+2,'* You must use word or long word when performing these operations.');

  new_line();
  new_line();
  new_line();
  new_line();

//======================================================================================================================
  $pdf->Bookmark('3. $C00008 (HV Counter)',2,current_line() - 10);
  $pdf->Text($margin['tab_1'],current_line(),'3.');
  $pdf->Text($margin['tab_2']-4,current_line(),'$ C 0 0 0 0 8 (HV COUNTER)');

  new_line();
  new_line();

  $pdf->Text($margin['tab_2']-4,current_line()+2,'NON INTERLACE MODE');
  
  new_line(206); 
  gentab_BitField_16($margin['tab_2'],current_line() - 3,15.4,7,
    '$ C 0 0 0 0 8',
    array('VC7','VC6','VC5','VC4','VC3','VC2','VC1','VC0'),
    '',
    array('HC8','HC7','HC6','HC5','HC4','HC3','HC2','HC1')
  );

  $pdf->SetFont('arial','',10);

  new_line();
    $pdf->Text($margin['tab_2']-4,current_line(),'INTERLACE MODE');
  new_line();
  new_line();
  
  //new_line(234); 
  gentab_BitField_16($margin['tab_2'],current_line(),15.4,7,
    '$ C 0 0 0 0 8',
    array('VC7','VC6','VC5','VC4','VC3','VC2','VC1','VC8'),
    '',
    array('HC8','HC7','HC6','HC5','HC4','HC3','HC2','HC1')
  );
  
  $pdf->SetFont('arial','',10);

  new_line(current_line() + 10);
    $pdf->Text($margin['tab_2'] + 2,current_line(),'HC8 ~ HC1:');
    $pdf->Text($margin['tab_2'] + 28,current_line(),'H COUNTER');
  new_line();
    $pdf->Text($margin['tab_2'] + 2,current_line(),'VC8 ~ VC0:');
    $pdf->Text($margin['tab_2'] + 28,current_line(),'V COUNTER');
  
  
   
  add_footer($pdf,'02/19/92','12');
?>
